import { CommonModule, registerLocaleData } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import en from '@angular/common/locales/en';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ServiceWorkerModule } from '@angular/service-worker';
import { en_US, NgZorroAntdModule, NZ_I18N } from 'ng-zorro-antd';
import { environment } from 'src/environments/environment';
import { DefaultLayoutComponent } from './component/default-layout/default-layout.component';
import { CoreRoutingModule } from './core-routing.module';

registerLocaleData(en);

@NgModule({
  declarations: [DefaultLayoutComponent],
  imports: [
    CommonModule,
    CoreRoutingModule,
    NgZorroAntdModule,
    FormsModule,
    HttpClientModule,
    BrowserAnimationsModule,
    ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })
  ],
  providers: [{ provide: NZ_I18N, useValue: en_US }],
  exports: [
    CoreRoutingModule,
  ]
})

export class CoreModule { }
